﻿module Sustainalytics.Authentication {

    export interface IAuthenticationService {

        login(userCredentials): ng.IHttpPromise<AuthData>;
        loginWithIp(): ng.IHttpPromise<AuthData>;
        logout(redirectTo?: string, err?: number, noRedirect?: boolean);
        profile(): ng.IHttpPromise<Common.IUserInfo>;
        refreshToken(): ng.IPromise<any>;
        forgotPassword(username: string): ng.IHttpPromise<any>;
        setPassword(setPasswordParams): ng.IHttpPromise<any>;
        changePassword(changePasswordParams): ng.IHttpPromise<any>;
        acceptLegalAgreement(username: string): ng.IHttpPromise<any>;
        permissions(): ng.IHttpPromise<Sustainalytics.Claims.ActiveResourcesDto[]>;
    }
}